The present invention relates to an image signal compression apparatus for use in a recording and transmitting apparatus for recording and transmitting an image in the form of compressed data or the like. More particularly, this invention relates to an image signal compression apparatus suitable for recording and reproducing a moving image of a moving image edit apparatus in the compressed form in a real time.
The standardization of an image compression method has been made in recent image processing apparatus. As the standardization of the image compression method, a JPEG (Joint Picture Expert Group) system (JPEG standard (JPEG-9-R7) is determined and utilized (see special number "Understanding and Application of Image data compression" of magazine "INTERFACE" Dec. 12, 1991, published by CQ publishing Inc., pp. 177,180 and 204-208). Further, circuit elements (LSIs) (LSIs manufactured by LSI Logic Corp., under the trade names of L64765, L64735 and L64745 and LSI manufactured by C-Cube Corp., under the trade name of CL550) in which the JPEG can be applied to NTSC or PAL television moving pictures in a real time fashion are now developed. On the other hand, in the video edit field, it is customary that the editing of image is carried out by using video tapes. Recently, an apparatus which can considerably reduce edit work time by recording a video signal based on the JPEG in the form of compressed data and instantly reproducing the recorded video signal randomly has received a remarkable attention (see special number "How Tapeless Edit system will be developed?" of a magazine entitled "VIDEO .alpha.", Oct. 1991, published by Photographic Industry Publishing Inc., pp. 27-32 and Educational Report April 1992, "VIDEO AND STILL IMAGE COMPRESSION", published by Knowledge Industry Publications Inc., pp. S-16, S-25, S-27 and S-28).
Encoding and decoding in the JPEG will be described with reference to FIGS. 4 and 5. FIG. 4 is a block diagram showing an encoding unit of a conventional compression apparatus based on the standard JPEG. FIG. 5 is s block diagram showing a decoding unit of such a conventional compression apparatus.
As shown in FIG. 4, the encoding unit of the conventional compression apparatus comprises a discrete cosine unit (DCT unit) 101, a memory 102 for storing therein one quantization table (Q table) corresponding to a predetermined quantization accuracy, a memory 103 for storing therein a Huffman coding table, a quantizing unit 104, a Huffman coding unit 105, an FIFO (first-in first-out) memory 106, a byte stuffing unit 107, a marker code adding unit 108 and a control unit 109 for controlling the aforesaid units.
Operation of the encoding unit of this conventional image signal compression apparatus will be described.
The discrete cosine transform unit 101 obtains a discrete cosine coefficient (DCT coefficient) by processing a digital video signal in a discrete cosine transform fashion. That is, the digital video signal is converted into a spatial frequency component. The quantizing unit 104 quantizes the discrete cosine coefficient with reference to the quantization table stored in the memory 102. The Huffman coding unit 105 obtains coded data by coding the discrete cosine coefficient quantized by the quantizing unit 104 into a Huffman code with reference to the Huffman coding table stored in the memory 103. The encoded data is temporarily stored in the FIFO memory 106. The quantization table and the Huffman coding table also are temporarily stored in the FIFO memory 106 through the control unit 109. The coded data, the quantization table and the Huffman coding table stored in the FIFO memory 106 are read out therefrom at a constant interval in a predetermined order and then transmitted to the byte stuffing unit 107.
The byte stuffing unit 107 inserts data "00", which will be described later, into the data read out from the FIFO memory 106. The JPEG system determines marker codes which indicate the starting portion of the code, the ending portion of the code, the Q table or the like. The marker code is represented by data "FFxx" (xx are data other than data 00) of 16 bits. In this case, since the JPEG code (the encoded data) is a variable length code and whose one portion frequently becomes "FF", data "FF" in the encoded data cannot be discriminated from the marker code. Therefore, the code string of the encoded data is separated at the unit of 8 bits so that, when the value thereof is "FF", the identification data "00" are inserted into the last of the code by the byte stuffing unit 107. Accordingly, the marker code is "FFxx" (xx are data other than the data 00) and therefore can be discriminated from the code.
Then, the marker code adding unit 108 adds the marker code to output data of the byte stuffing unit 107 and then outputs the data added with the marker code as a compression code.
As shown in FIG. 5, the decoding unit of the conventional compression apparatus includes an inverse discrete cosine transform unit (inverse DCT unit) 111, registers 112 and 113, an inverse quantizing unit 114, a Huffman decoding unit 115, an FIFO memory 116, a byte delete unit 117, a marker code eliminating unit 118 and a control unit 119 for controlling the aforesaid respective units.
Operation of the decoding unit in the conventional image signal compression apparatus will be described below.
The maker code eliminating unit 118 eliminates the marker code from the above-mentioned compression code. The byte delete unit 117 eliminates the data "00" inserted by the byte stuffing unit 107. More specifically, data "FF" are detected by the marker code eliminating unit 118 and the byte delete unit 117. If the next data are "00", then the data "00" are deleted. If on the other hand, the next data are other than the data "00", then the data "FF" and the succeeding code string (corresponding to the marker code) are eliminated. The compression code from which the marker code and the data "00" inserted by the byte stuffing unit 107 are eliminated is temporarily stored in the FIFO memory 116. Of data stored in the FIFO memory 116, the quantization table and the Huffman coding table are respectively transferred through the control unit 119 to the registers 112 and 113. The coded data of the data stored in the FIFO memory 116 is transmitted to the Huffman decoding unit 115. The Huffman decoding unit 115 obtains Huffman decoded data by processing the coded data in a Huffman decoding fashion with reference to the Huffman coding table (or a Huffman coding/decoding table corresponding to the Huffman coding table) transferred to the register 113. The inverse quantizing unit 114 obtains a decoded discrete cosine coefficient by processing the Huffman decoded data in an inverse quantization fashion with reference to the quantization table transferred to the register 112. The inverse discrete cosine transform unit 111 obtains a digital video signal by processing the decoded discrete cosine coefficient in an inverse discrete cosine transform fashion.